- unless sections.empty?
  - toclevels ||= (document.attr 'toclevels', DEFAULT_TOCLEVELS).to_i
  - slevel = section_level sections.first
  ul class="sectlevel#{slevel}"
    - sections.each do |sec|
      li
        / JETTY: test if of the section starts with a http or https in which case
        / render as an external link, otherwise render normally
        /! #{sec.id}
        - if "#{sec.id}".start_with?("http://") || "#{sec.id}".start_with?("https://") || "#{sec.id}".start_with?("_")
          =section_title sec
        - else
          a href="##{sec.id}" =section_title sec
        - if (sec.level < toclevels) && (child_toc = converter.convert sec, 'outline')
          = child_toc
